<!DOCTYPE html>
<html lang="zh"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{{$item->goods_name}} </title>
<meta property="qc:admins" content=""><meta property="wb:webmaster" content="bede83c4f9989089">
<link href="/home/css/base.css" rel="stylesheet" type="text/css">
<link href="/home/css/home_header.css" rel="stylesheet" type="text/css">
<link href="/home/css/font-awesome.min.css" rel="stylesheet">
<script>
var COOKIE_PRE = 'C6E0_';var _CHARSET = 'utf-8';var SITEURL = 'http://mall.wrtx.cn/shop';var SHOP_SITE_URL = 'http://mall.wrtx.cn/shop';var RESOURCE_SITE_URL = 'http://mall.wrtx.cn/data/resource';var RESOURCE_SITE_URL = 'http://mall.wrtx.cn/data/resource';var SHOP_TEMPLATES_URL = 'http://mall.wrtx.cn/shop/templates/default';
</script>
<script src="/home/js/jquery.js"></script>
<script src="/home/js/common.js" charset="utf-8"></script>
<script src="/home/js/jquery.ui.js"></script>
<script src="/home/js/jquery.validation.min.js"></script>
<script src="/home/js/jquery.masonry.js"></script>
<script src="/home/js/dialog.js" id="dialog_js" charset="utf-8"></script><link href="/home/css/dialog.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
var PRICE_FORMAT = '&yen;%s';
$(function(){
  //首页左侧分类菜单
  $(".category ul.menu").find("li").each(
    function() {
      $(this).hover(
        function() {
            var cat_id = $(this).attr("cat_id");
          var menu = $(this).find("div[cat_menu_id='"+cat_id+"']");
          menu.show();
          $(this).addClass("hover");          
          var menu_height = menu.height();
          if (menu_height < 60) menu.height(80);
          menu_height = menu.height();
          var li_top = $(this).position().top;
          $(menu).css("top",-li_top + 38);
        },
        function() {
          $(this).removeClass("hover");
            var cat_id = $(this).attr("cat_id");
          $(this).find("div[cat_menu_id='"+cat_id+"']").hide();
        }
      );
    }
  );
  $(".head-user-menu dl").hover(function() {
    $(this).addClass("hover");
  },
  function() {
    $(this).removeClass("hover");
  });
  $('.head-user-menu .my-mall').mouseover(function(){// 最近浏览的商品
    load_history_information();
    $(this).unbind('mouseover');
  });
  $('.head-user-menu .my-cart').mouseover(function(){// 运行加载购物车
    load_cart_information();
    $(this).unbind('mouseover');
  });
  $('#button').click(function(){
      if ($('#keyword').val() == '') {
        return false;
      }
  });
    });

$(function(){
  //search
  var act = "goods";
  if (act == "store_list"){
    $("#search").children('ul').children('li:eq(1)').addClass("current");
    $("#search").children('ul').children('li:eq(0)').removeClass("current");
    }
  $("#search").children('ul').children('li').click(function(){
    $(this).parent().children('li').removeClass("current");
    $(this).addClass("current");
    $('#search_act').attr("value",$(this).attr("act"));
    $('#keyword').attr("placeholder",$(this).attr("title"));
  });
  $("#keyword").blur();
  var cook = getCookie('v3_banner');
    if(cook){
    $("#top-banner").hide();
    } else {
      $("#top-banner").slideDown(800);
      }
    $("#top-banner .close").click(function(){
      setCookie('v3_banner','yes',1);
      $("#top-banner").hide();
  }); 
});
</script>
</head>
<body>
@include('home.common.header')
</div>

<link href="/home/css/home_goods.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/home/js/cloudzoom.js"></script>
<style type="text/css">
.nch-sidebar-all-viewed { display: block; height: 20px; text-align: center; padding: 9px 0; }
</style>

<div class="wrapper pr">
  <input type="hidden" id="lockcompare" value="unlock">
  <div class="ncs-detail"> 
    <!-- S 商品图片 --> 

<div id="ncs-goods-picture" class="ncs-goods-picture">
      <div class="gallery_wrap">
        <div class="gallery"><img title="鼠标滚轮向上或向下滚动，能放大或缩小图片哦~" src="{{url('/'.$item->goods_ori)}}" class="cloudzoom" > </div>
      </div>
      <div class="controller_wrap">
        <div class="controller">
        </div>
      </div>
    </div>
    
    <!-- S 商品基本信息 -->
    <div class="ncs-goods-summary">
      <div class="name">
        <h1>{{$item->goods_name}}</h1>
        <strong></strong> </div>
      <div class="ncs-meta"> 
        
        <!-- S 商品参考价格 -->
        <dl>
          <dt>市&nbsp;场&nbsp;价：</dt>
          <dd class="cost-price"><strong>¥{{$item->market_price}}</strong></dd>
        </dl>
        <!-- E 商品参考价格 --> 
        <!-- S 商品发布价格 -->
        <dl>
          <dt>商&nbsp;城&nbsp;价：</dt>
          <dd class="price">
                        <strong>¥{{$item->shop_price}}</strong>
                      </dd>
        </dl>
         <input type="hidden" value="{{$item->goods_id}}" id="goods_id">

        <dl class="rate">
          <dt>商品评分：</dt>
          <!-- S 描述相符评分 -->
          <dd><span class="raty" data-score="5" title="很满意" style="width: 100px;"><img src="/home/images/star-on.png" alt="1" title="很满意">&nbsp;<img src="/home/images/star-on.png" alt="2" title="很满意">&nbsp;<img src="/home/images/star-on.png" alt="3" title="很满意">&nbsp;<img src="/home/images/star-on.png" alt="4" title="很满意">&nbsp;<img src="/home/images/star-on.png" alt="5" title="很满意"><input type="hidden" name="score" value="5" readonly="readonly"></span><a href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#ncGoodsRate">共有0条评价</a></dd>
          <!-- E 描述相符评分 -->
        </dl>
        <!-- E 商品发布价格 -->
        <div class="ncs-goods-code">
          <p><img src="/home/images/100003.png" title="用手机扫二维码直达商品详情内容"></p>
          <span class="ncs-goods-code-note"><i></i>手机扫一扫有惊喜</span> </div>
      </div>
            <!-- S 促销 -->
            <!-- E 促销 -->
      
      <div class="ncs-logistics"><!-- S 物流与运费新布局展示  -->
                <dl id="ncs-freight" class="ncs-freight">
          <dt>配&nbsp;&nbsp;送&nbsp;&nbsp;至：</dt>
          <dd class="ncs-freight_box">
            <div id="ncs-freight-selector" class="ncs-freight-select">
              <div class="text">
                <div>广东</div>
                <b>∨</b> </div>
              <div class="content">
                <div id="ncs-stock" class="ncs-stock" data-widget="tabs">
                  <div class="mt">
                    <ul class="tab">
                      <li data-index="0" data-widget="tab-item" class="curr"><a href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none" class=""><em>广东</em><i> ∨</i></a></li><li data-index="1" data-widget="tab-item"><a class="hover" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none"><em>请选择</em><i> ∨</i></a></li>
                    </ul>
                  </div>
                  <div id="stock_province_item" data-widget="tab-content" data-area="0" style="display: none;">
                    <ul class="area-list"><li><a data-value="1" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">北京</a></li><li><a data-value="2" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">天津</a></li><li><a data-value="3" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">河北</a></li><li><a data-value="4" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">山西</a></li><li><a data-value="5" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">内蒙古</a></li><li><a data-value="6" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">辽宁</a></li><li><a data-value="7" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">吉林</a></li><li><a data-value="8" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">黑龙江</a></li><li><a data-value="9" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">上海</a></li><li><a data-value="10" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">江苏</a></li><li><a data-value="11" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">浙江</a></li><li><a data-value="12" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">安徽</a></li><li><a data-value="13" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">福建</a></li><li><a data-value="14" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">江西</a></li><li><a data-value="15" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">山东</a></li><li><a data-value="16" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">河南</a></li><li><a data-value="17" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">湖北</a></li><li><a data-value="18" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">湖南</a></li><li><a data-value="19" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">广东</a></li><li><a data-value="20" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">广西</a></li><li><a data-value="21" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">海南</a></li><li><a data-value="22" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">重庆</a></li><li><a data-value="23" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">四川</a></li><li><a data-value="24" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">贵州</a></li><li><a data-value="25" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">云南</a></li><li><a data-value="26" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">西藏</a></li><li><a data-value="27" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">陕西</a></li><li><a data-value="28" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">甘肃</a></li><li><a data-value="29" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">青海</a></li><li><a data-value="30" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">宁夏</a></li><li><a data-value="31" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">新疆</a></li><li><a data-value="32" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">台湾</a></li><li><a data-value="33" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">香港</a></li><li><a data-value="34" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">澳门</a></li><li><a data-value="35" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">海外</a></li></ul>
                  </div>
                  <div id="stock_city_item" data-widget="tab-content" data-area="1" style="">
                    <ul class="area-list"><li><a data-value="289" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">广州市</a></li><li><a data-value="290" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">韶关市</a></li><li><a data-value="291" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">深圳市</a></li><li><a data-value="292" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">珠海市</a></li><li><a data-value="293" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">汕头市</a></li><li><a data-value="294" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">佛山市</a></li><li><a data-value="295" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">江门市</a></li><li><a data-value="296" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">湛江市</a></li><li><a data-value="297" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">茂名市</a></li><li><a data-value="298" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">肇庆市</a></li><li><a data-value="299" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">惠州市</a></li><li><a data-value="300" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">梅州市</a></li><li><a data-value="301" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">汕尾市</a></li><li><a data-value="302" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">河源市</a></li><li><a data-value="303" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">阳江市</a></li><li><a data-value="304" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">清远市</a></li><li><a data-value="305" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">东莞市</a></li><li><a data-value="306" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">中山市</a></li><li><a data-value="307" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">潮州市</a></li><li><a data-value="308" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">揭阳市</a></li><li><a data-value="309" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#none">云浮市</a></li></ul>
                  </div>
                  <div id="stock_area_item" data-widget="tab-content" data-area="2" style="display: none;">
                    <ul class="area-list">
                    </ul>
                  </div>
                </div>
              </div>
              <a href="javascript:;" class="close" onclick="$(&#39;#ncs-freight-selector&#39;).removeClass(&#39;hover&#39;)">关闭</a> </div>
            <div id="ncs-freight-prompt"> <strong>有货</strong>
                            免运费                          </div>
          </dd>
        </dl>
        <!-- S 物流与运费新布局展示  -->
              </div>
      <div class="ncs-key"> 


        <!-- S 商品规格值-->
                <!-- E 商品规格值-->
                      </div>
      <!-- S 购买数量及库存 -->
      <div class="ncs-buy">
        <div class="ncs-figure-input">
          <input type="text"  id="num" value="1" size="3" maxlength="6" class="input-text">
        </div>
        <div class="ncs-point" style="display: none;"><i></i> 
          <!-- S 库存 --> 
          <span>您选择的商品库存<strong nctype="goods_stock">25711</strong>件</span> 
          <!-- E 库存 -->
                            </div>
                
        <!-- S 提示已选规格及库存不足无法购买 -->
                <!-- E 提示已选规格及库存不足无法购买 --> 
        <div class="ncs-btn"> 
                              <!-- 加入购物车--> 
          <a href="javascript:void(0);" nctype="addcart_submit" id="addcart" class="addcart" data-value="{{url('cartadd')}}" title="添加购物车">添加购物车</a>
          <a href="javascript:void(0);" class="addcart" name="shoucang" title="收藏宝贝">收藏宝贝</a>
          <a href="/cart" class="addcart"  title="">立即支付</a>
           <script>
                $('a[name="shoucang"]').bind('click',function(){
                    var gid = {{$item->goods_id}};
                    var url = "/shoucang";
                    var data = {
                        'gid':gid,
                        '_token':'{{csrf_token()}}' 
                    };
                    $.post(url,data,function(status){
                        console.log(status);
                        if(status==0){
                            alert('你还没有登陆!点击确定跳转到登陆页面!');
                            location.href = "/login";
                        }else if(status==1){
                            alert('您已经收藏过该商品了!')
                        }else if(status==2){
                            alert('收藏成功!');
                        }else if(status==3){
                            alert('收藏失败!');
                        }
                    },'json');
                })
           </script>
          <script>
             var num = document.getElementById('num');
             var addcart = document.getElementById('addcart');
             var goods_id = document.getElementById('goods_id');
             addcart.onclick = function()
             { 
                 var ajaxinfo = document.getElementById('ajax_info');
                 var closeinfo = document.getElementById('ajax_info_close');
                 var url = this.dataset.value  + '/' +  goods_id.value + '/' +  num.value;
                 var xhr =  new XMLHttpRequest();
                 xhr.onreadystatechange = function()
                 {
                    if(xhr.readyState == 4)
                    {
                       if(xhr.responseText == 0)
                       {
                          window.location.href = 'http://www.group.com/login';
                       }
                       else
                       {
                          ajaxinfo.style.display ="block";
                       }
                    }
                 }

                 xhr.open('GET',url,true);
                 xhr.send(null);

                 closeinfo.onclick = function()
                 {
                    ajaxinfo.style.display = "none";
                 }
             }
          </script>
          <!-- S 加入购物车弹出提示框 -->
          <div class="ncs-cart-popup">
            <dl>
              <dt>成功添加到购物车<a title="关闭" onclick="$(&#39;.ncs-cart-popup&#39;).css({&#39;display&#39;:&#39;none&#39;});">X</a></dt>
              <dd>购物车共有 <strong id="bold_num"></strong> 种商品 总金额为：<em id="bold_mly" class="saleP"></em></dd>
              <dd class="btns"><a href="javascript:void(0);" class="ncs-btn-mini ncs-btn-green" onclick="location.href=&#39;http://mall.wrtx.cn/shop/index.php?act=cart&#39;">查看购物车</a> <a href="javascript:void(0);" class="ncs-btn-mini" value="" onclick="$(&#39;.ncs-cart-popup&#39;).css({&#39;display&#39;:&#39;none&#39;});">继续购物</a></dd>
            </dl>
          </div>
          <!-- E 加入购物车弹出提示框 --> 
        </div>
        <!-- E 购买按钮 --> 
      </div>
            <!-- E 购买数量及库存 --> 
      
      <!--E 商品信息 --> 
    </div>
    <!--S 店铺信息-->
    <div style="position: absolute; z-index: 2; top: -1px; right: -1px;">
      <!--店铺基本信息 S-->
<div class="ncs-info">
  <div class="title">
    <h4>广州网软志成信息科技有限公司</h4>
  </div>
  <div class="content">

    <dl class="all-rate">
      <dt>综合评分：</dt>
      <dd>
        <div class="rating"><span style="width: 100%"></span></div>
        <em>5</em>分</dd>
    </dl>
    <div class="ncs-detail-rate">
      <h5><strong>店铺动态评分</strong>与行业相比</h5>
      <ul>
                <li> 描述相符<span class="credit">5 分</span> <span class="high"><i></i>高于<em>4%</em></span> </li>
                <li> 服务态度<span class="credit">5 分</span> <span class="equal"><i></i>持平<em>----</em></span> </li>
                <li> 发货速度<span class="credit">5 分</span> <span class="high"><i></i>高于<em>4%</em></span> </li>
              </ul>
    </div>

        <dl class="messenger">
      <dt>联系方式：</dt>
      <dd><span member_id="1"></span>
                <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=38306293&site=qq&menu=yes" title="QQ: 38306293"><img border="0" src="/home/images/pa" style=" vertical-align: middle;"></a>
                        <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=%E5%8D%81%E4%BD%B3%E6%8E%8C%E6%9F%9C&site=cntaobao&s=1&charset=UTF-8"><img border="0" src="/home/images/online.aw" alt="点击这里给我发消息" style=" vertical-align: middle;"></a>
              </dd>
    </dl>
                <!--只有实名认证实体店认证后才显示保障体系 by www_wrtx_cn -->    
  
    <dl class="messenger">    
   <dt>商户保障：</dt>
       <dd>
               <!--新加的保障-->
          <span id="certMatershiti" class="text-hidden fl ml5" title="实体认证"></span>
                  
            <span id="certMaterqtian" class="text-hidden fl ml5" title="实物拍摄"></span>
                  
            <span id="certMaterzhping" class="text-hidden fl ml5" title="正品保障"></span>
                  
            <span id="certMatererxiaoshi" class="text-hidden fl ml5" title="24小时内发货"></span>
                  
            <span id="certMatertuihuo" class="text-hidden fl ml5" title="退货承诺"></span>
                  
            <span id="certMatershiyong" class="text-hidden fl ml5" title="试用中心"></span>
                  
            <span id="certMaterxiaoxie" class="text-hidden fl ml5" title="消费者保障"></span>
                  
            <span id="certMaterhuodaofk" class="text-hidden fl ml5" title="支持货到付款"></span>
        <!--新加的保障-->    
      </dd>
    </dl>
                
      <!--保证金金额-->
     <dl class="messenger">   
      <dt>保证金额：</dt>
      <dd style="width: 100px;">20000 
       元(已交纳)  
      </dd>
   </dl> 
    
    
    <!--保障体系 by www_wrtx_cn-->
          <dl class="no-border">
        <dt>公司名称：</dt>
        <dd>广州网软志成信息科技有限公司</dd>
    </dl>
    <dl>
        <dt>所&nbsp;&nbsp;在&nbsp;&nbsp;地：</dt>
        <dd>广东 广州市 天河区</dd>
    </dl>
            <dl>
        <dt>电　　话：</dt>
        <dd>020-34506590</dd>
    </dl>
      
    <div class="goto"><a href="http://mall.wrtx.cn/shop/shop-1.html">进入商家店铺</a><a href="javascript:collect_store('1','count','store_collect')">收藏店铺<em nctype="store_collect">3</em></a></div>
    <div class="shop-other" id="shop-other">
    <ul>
      <li class="ncs-info-btn-map"><a href="javascript:void(0)" class="pngFix"><span>店铺地图</span><b></b> <!-- 店铺地图 -->
        <div class="ncs-info-map" id="map_container" style="width:208px;height:208px;"></div>
        </a></li>
      <li class="ncs-info-btn-qrcode"><a href="javascript:void(0)" class="pngFix"><span>店铺二维码</span><b></b>
        <p class="ncs-info-qrcode"><img src="/home/images/1_store.png" title="店铺原始地http://mall.wrtx.cn/shop/shop_view-1-0-0-0-0.html" style="width:208px;height:208px"></p>
        </a></li>
    </ul>
    </div> 
  </div>
</div>
<!--店铺基本信息 E--> 
<script type="text/javascript">
var cityName = "广州市天河区国家软件园产业基地8栋502";
var address = "广东 广州市 天河区";
var store_name = "广州网软志成信息科技有限公司"; 
function initialize() {
  map = new BMap.Map("map_container");
  localCity = new BMap.LocalCity();
  
  map.enableScrollWheelZoom(); 
  localCity.get(function(cityResult){
    if (cityResult) {
      var level = cityResult.level;
      if (level < 13) level = 13;
      map.centerAndZoom(cityResult.center, level);
      cityResultName = cityResult.name;
      if (cityResultName.indexOf(cityName) >= 0) cityName = cityResult.name;
              getPoint();
          }
  });
}
 
function loadScript() {
  var script = document.createElement("script");
  script.src = "http://api.map.baidu.com/api?v=1.2&callback=initialize";
  document.body.appendChild(script);
}
function getPoint(){
  var myGeo = new BMap.Geocoder();
  myGeo.getPoint(address, function(point){
    if (point) {
      setPoint(point);
    }
  }, cityName);
}
function setPoint(point){
    if (point) {
      map.centerAndZoom(point, 16);
      var marker = new BMap.Marker(point);
      map.addOverlay(marker);
    }
}

// 当鼠标放在店铺地图上再加载百度地图。
$(function(){
  $('.ncs-info-btn-map').one('mouseover',function(){
    loadScript();
  });
  $('.ncs-info-btn-map').one('click',function(){
    loadScript();
  });
});
</script> 

<script>
$(function(){
  var store_id = "1";
  var goods_id = "100003";
  var act = "goods";
  var op  = "index";
  $.getJSON("index.php?act=show_store&op=ajax_flowstat_record",{store_id:store_id,goods_id:goods_id,act_param:act,op_param:op});
});
</script>
          <!--E 店铺信息 --> 
  </div>
  <div class="clear"></div>
</div>
<!-- S 优惠套装 -->
<div class="ncs-promotion" id="nc-bundling" style="display:none;"></div>
<!-- E 优惠套装 -->
<div id="content" class="ncs-goods-layout expanded">
  <div class="ncs-goods-main" id="main-nav-holder">
    <div class="tabbar pngFix" id="main-nav">
      <div class="ncs-goods-title-nav">
        <ul id="categorymenu">
          <li class="current"><a id="tabGoodsIntro" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#content">商品详情</a></li>
          <li><a id="tabGoodsRate" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#content">商品评价<em>(0)</em></a></li>
          <li><a id="tabGoodsTraded" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#content">销售记录<em>(24)</em></a></li>
          <li><a id="tabGuestbook" href="http://mall.wrtx.cn/shop/index.php?act=goods&op=index&goods_id=100003#content">购买咨询</a></li>
        </ul>
        <div class="switch-bar"><a href="javascript:void(0)" id="fold">&nbsp;</a></div>
      </div>
    </div>
    <div class="ncs-intro">
      <div class="content bd" id="ncGoodsIntro"> 
                <ul class="nc-goods-sort">
                    <li>商家货号：{{$item->goods_sn}}</li>
                   
                    <li>品牌：</li>                  </ul>
                <div class="ncs-goods-info-content">
                 
                 {!!$item->goods_desc!!}
 
                </div>
      </div>
    </div>
    <div class="ncs-comment">
      <div class="ncs-goods-title-bar hd">
        <h4><a href="javascript:void(0);">商品评价</a></h4>
      </div>
      <div class="ncs-goods-info-content bd" id="ncGoodsRate">
        <div class="top">
          <div class="rate">
            <p><strong>100</strong><sub>%</sub>好评</p>
            <span>共有0人参与评分</span></div>
          <div class="percent">
            <dl>
              <dt>好评<em>(100%)</em></dt>
              <dd><i style="width: 100%"></i></dd>
            </dl>
            <dl>
              <dt>中评<em>(0%)</em></dt>
              <dd><i style="width: 0%"></i></dd>
            </dl>
            <dl>
              <dt>差评<em>(0%)</em></dt>
              <dd><i style="width: 0%"></i></dd>
            </dl>
          </div>
          <div class="btns"><span>您可对已购商品进行评价</span>
            <p><a href="http://mall.wrtx.cn/shop/index.php?act=member_order&op=index" class="ncs-btn ncs-btn-red" target="_blank"><i class="icon-comment-alt"></i>评价商品</a></p>
          </div>
        </div>
        <div class="ncs-goods-title-nav">
          <ul id="comment_tab">
            <li data-type="all" class="current"><a href="javascript:void(0);">商品评价(0)</a></li>
            <li data-type="1"><a href="javascript:void(0);">好评(0)</a></li>
            <li data-type="2"><a href="javascript:void(0);">中评(0)</a></li>
            <li data-type="3"><a href="javascript:void(0);">差评(0)</a></li>
          </ul>
        </div>
        <!-- 商品评价内容部分 -->
        <div id="goodseval" class="ncs-commend-main"><div class="ncs-norecord">暂无符合条件的数据记录</div>
 

</div>
      </div>
    </div>
    <div class="ncg-salelog">
      <div class="ncs-goods-title-bar hd">
        <h4><a href="javascript:void(0);">销售记录</a></h4>
      </div>
      <div class="ncs-goods-info-content bd" id="ncGoodsTraded">
        <div class="top">
          <div class="price">商&nbsp;城&nbsp;价<strong>298.00</strong>元<span>购买的价格不同可能是由于店铺往期促销活动引起的，详情可以咨询卖家</span></div>
        </div>
        <!-- 成交记录内容部分 -->
        <div id="salelog_demo" class="ncs-loading">

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mt10">
  <thead>
    <tr>
      <th class="w200">买家</th>
      <th class="w100">购买价</th>
      <th class="">购买数量</th>
      <th class="w200">购买时间</th>
    </tr>
  </thead>
    <tbody>
        <tr>
      <td><a href="http://mall.wrtx.cn/shop/index.php?act=member_snshome&mid=7" target="_blank" data-param="{&#39;id&#39;:7}" nctype="mcard" data-hasqtip="0">admin</a></td>
      <td><em class="price">¥298.00</em> <i style="color:red;"></i></td>
      <td>1</td>
      <td><time>2016-03-19 14:46:26</time></td>
    </tr>
      
     
      </tbody>
  <tfoot>
    <tr>
      <td colspan="10" class="tr"><div class="pagination"> <ul><li><span>首页</span></li><li><span>上一页</span></li><li><span class="currentpage">1</span></li><li><span>下一页</span></li><li><span>末页</span></li></ul> </div></td>
    </tr>
  </tfoot>
  </table>
</div>
      </div>
    </div>
    <div class="ncs-consult">
      <div class="ncs-goods-title-bar hd">
        <h4><a href="javascript:void(0);">购买咨询</a></h4>
      </div>
      <div class="ncs-goods-info-content bd" id="ncGuestbook"> 
        <!-- 咨询留言内容部分 -->
        <div id="consulting_demo" class="ncs-loading">

<div class="top" style="overflow: hidden;">
  <div class="ncs-cosult-tips"> <i></i>
    <p>因厂家更改商品包装、场地、附配件等不做提前通知，且每位咨询者购买、提问时间等不同。为此，客服给到的回复仅对提问者3天内有效，其他网友仅供参考！给您带来的不变还请谅解，谢谢！</p>
  </div>
  <div class="ncs-cosult-askbtn"><a href="http://mall.wrtx.cn/shop/index.php?act=goods&op=consulting_list&goods_id=100003#askQuestion" target="_blank" class="ncs-btn ncs-btn-red">我要提问</a></div>
</div>
<div class="ncs-goods-title-nav">
  <ul id="consulting_tab">
          </ul>
</div>
<div class="ncs-cosult-main">
    <div class="ncs-norecord">还没有咨询内容</div>
    
</div>
</div>
      </div>
    </div>
        <div class="ncs-recommend">
      <div class="title">
        <h4>推荐商品</h4>
      </div>
      <div class="content">
        <ul>
         <li>
            <dl>
              <dt class="goods-name"><a href="http://mall.wrtx.cn/shop/item-100044.html" target="_blank" title="">Peskoe/半球正品电水壶 快速烧水壶 不锈钢电热水壶 包邮小家电<em></em></a></dt>
              <dd class="goods-pic"><a href="http://mall.wrtx.cn/shop/item-100044.html" target="_blank" title=""><img src="/home/images/1_1073e24565t1ewlmx___0-item_pic_240.jpg" alt="Peskoe/半球正品电水壶 快速烧水壶 不锈钢电热水壶 包邮小家电"></a></dd>
              <dd class="goods-price">¥19.50</dd>
            </dl>
          </li>
       </ul>
        <div class="clear"></div>
      </div>
    </div>
      </div>
  <div class="ncs-sidebar">
    <div class="ncs-message-bar">
  <div class="default">
    <h5><a href="http://mall.wrtx.cn/shop/shop-1.html" title="进入店铺">广州网软志成信息科技有限公司</a></h5>
    <span member_id="1"></span>
        <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=38306293&site=qq&menu=yes" title="QQ: 38306293"><img border="0" src="/home/images/pa" style=" vertical-align: middle;"></a>
            <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=%E5%8D%81%E4%BD%B3%E6%8E%8C%E6%9F%9C&site=cntaobao&s=1&charset=UTF-8"><img border="0" src="/home/images/online.aw" alt="点击这里给我发消息" style=" vertical-align: middle;"></a>
      </div>
    <div class="service-list" store_id="1" store_name="广州网软志成信息科技有限公司">
      </div>
  </div>
    
<div class="ncs-sidebar-container ncs-class-bar">
  <div class="title">
    <h4>商品分类</h4>
  </div>
  <div class="content">
    <p><span><a href="http://mall.wrtx.cn/shop/shop_view-1-0-1-2-0.html">按新品</a></span><span><a href="http://mall.wrtx.cn/shop/shop_view-1-0-2-2-0.html">按价格</a></span><span><a href="http://mall.wrtx.cn/shop/shop_view-1-0-3-2-0.html">按销量</a></span><span><a href="http://mall.wrtx.cn/shop/shop_view-1-0-5-2-0.html">按人气</a></span></p>
    <div class="ncs-search">
      <form id="" name="searchShop" method="get" action="http://mall.wrtx.cn/shop/index.php">
        <input type="hidden" name="act" value="show_store">
        <input type="hidden" name="op" value="goods_all">
        <input type="hidden" name="store_id" value="1">
        <input type="text" class="text w120" name="inkeyword" value="" placeholder="搜索店内商品">
        <a href="javascript:document.searchShop.submit();" class="ncs-btn">搜索</a>
      </form>
    </div>
    <ul class="ncs-submenu">
      <li><span class="ico-none"><em>-</em></span><a href="http://mall.wrtx.cn/shop/shop_view-1-0-0-0-0.html">全部商品</a></li>
                        <li> <span class="ico-none"><em>-</em></span><a href="http://mall.wrtx.cn/shop/shop_view-1-1-0-0-0.html">多用户商城系统</a></li>
                      </ul>
  </div>
</div>

<div class="ncs-sidebar-container ncs-top-bar">
  <div class="title">
    <h4>商品排行</h4>
  </div>
  <div class="content">
    <ul class="ncs-top-tab pngFix">
      <li id="hot_sales_tab" class="current"><a href="http://mall.wrtx.cn/shop/shop_view-1-0-3-2-0.html">热销商品排行</a></li>
      <li id="hot_collect_tab"><a href="http://mall.wrtx.cn/shop/shop_view-1-0-4-2-0.html">热门收藏排行</a></li>
    </ul>
    <div id="hot_sales_list" class="ncs-top-panel">
            <ol>
                <li>
          <dl>
            <dt><a href="http://mall.wrtx.cn/shop/item-100003.html">{{$item->goods_name}}</a></dt>
            <dd class="goods-pic"><a href="http://mall.wrtx.cn/shop/item-100003.html"><span class="thumb size40"><i></i><img src="/home/images/1_00673d0a6ctb1_dqx___0-item_pic_60.jpg" onload="javascript:DrawImage(this,40,40);" width="40" height="40"></span></a>
              <p><span class="thumb size100"><i></i><img src="/home/images/1_00673d0a6ctb1_dqx___0-item_pic_240.jpg" onload="javascript:DrawImage(this,100,100);" title="{{$item->goods_name}}" width="100" height="100"><big></big><small></small></span></p>
            </dd>
            <dd class="price pngFix">298.00</dd>
            <dd class="selled pngFix">售出：<strong>24</strong>笔</dd>
          </dl>
        </li>
          </div>
    <p><a href="http://mall.wrtx.cn/shop/shop_view-1-0-0-0-0.html">查看本店其他商品</a></p>
  </div>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        //热销排行切换
        $('#hot_sales_tab').on('mouseenter', function() {
            $(this).addClass('current');
            $('#hot_collect_tab').removeClass('current');
            $('#hot_sales_list').removeClass('hide');
            $('#hot_collect_list').addClass('hide');
        });
        $('#hot_collect_tab').on('mouseenter', function() {
            $(this).addClass('current');
            $('#hot_sales_tab').removeClass('current');
            $('#hot_sales_list').addClass('hide');
            $('#hot_collect_list').removeClass('hide');
        });
    });
    /** left.php **/
    // 商品分类
    function class_list(obj){
      var stc_id=$(obj).attr('span_id');
      var span_class=$(obj).attr('class');
      if(span_class=='ico-block') {
        $("#stc_"+stc_id).show();
        $(obj).html('<em>-</em>');
        $(obj).attr('class','ico-none');
      }else{
        $("#stc_"+stc_id).hide();
        $(obj).html('<em>+</em>');
        $(obj).attr('class','ico-block');
      }
    }
</script> 
      </div>
</div>
</div>
<form id="buynow_form" method="post" action="http://mall.wrtx.cn/shop/index.php">
  <input id="act" name="act" type="hidden" value="buy">
  <input id="op" name="op" type="hidden" value="buy_step1">
  <input id="cart_id" name="cart_id[]" type="hidden">
</form>
<script type="text/javascript" src="/home/js/jquery.charCount.js"></script> 
<script src="/home/js/jquery.ajaxContent.pack.js" type="text/javascript"></script> 
<script src="/home/js/sns.js" type="text/javascript" charset="utf-8"></script> 
<script src="/home/js/jquery.F_slider.js" type="text/javascript" charset="utf-8"></script> 
<script type="text/javascript" src="/home/js/waypoints.js"></script> 
<script type="text/javascript" src="/home/js/jquery.raty.min.js"></script> 
<script type="text/javascript" src="/home/js/custom.min.js" charset="utf-8"></script>
<link href="/home/css/nyroModal.css" rel="stylesheet" type="text/css" id="cssfile2">
<script type="text/javascript">
/** 辅助浏览 **/
jQuery(function($){
  // 放大镜效果 产品图片
     CloudZoom.quickStart();
     
            // 图片切换效果
                $(".controller li").first().addClass('current');
                $('.controller').find('li').mouseover(function(){
                $(this).first().addClass("current").siblings().removeClass("current");
                });
});

    //收藏分享处下拉操作
    jQuery.divselect = function(divselectid,inputselectid) {
      var inputselect = $(inputselectid);
      $(divselectid).mouseover(function(){
          var ul = $(divselectid+" ul");
          ul.slideDown("fast");
          if(ul.css("display")=="none"){
              ul.slideDown("fast");
          }
      });
      $(divselectid).live('mouseleave',function(){
          $(divselectid+" ul").hide();
      });
    };
$(function(){
  //赠品处滚条
  $('#ncsGoodsGift').perfectScrollbar({suppressScrollX:true});
        // 加入购物车
    $('a[nctype="addcart_submit"]').click(function(){
      if (typeof(allow_buy) != 'undefined' && allow_buy === false) return ;
        addcart(100003, checkQuantity(),'addcart_callback');
    });
                // 立即购买
        $('a[nctype="buynow_submit"]').click(function(){
          if (typeof(allow_buy) != 'undefined' && allow_buy === false) return ;
            buynow(100003,checkQuantity());
        });
                // 到货通知
            //浮动导航  waypoints.js
    $('#main-nav').waypoint(function(event, direction) {
        $(this).parent().parent().parent().toggleClass('sticky', direction === "down");
        event.stopPropagation();
    });

    // 分享收藏下拉操作
    $.divselect("#handle-l");
    $.divselect("#handle-r");

    // 规格选择
    $('dl[nctype="nc-spec"]').find('a').each(function(){
        $(this).click(function(){
            if ($(this).hasClass('hovered')) {
                return false;
            }
            $(this).parents('ul:first').find('a').removeClass('hovered');
            $(this).addClass('hovered');
            checkSpec();
        });
    });

});

function checkSpec() {
    var spec_param = [{"sign":"","url":"http:\/\/mall.wrtx.cn\/shop\/item-100003.html"}];
    var spec = new Array();
    $('ul[nctyle="ul_sign"]').find('.hovered').each(function(){
        var data_str = ''; eval('data_str =' + $(this).attr('data-param'));
        spec.push(data_str.valid);
    });
    spec1 = spec.sort(function(a,b){
        return a-b;
    });
    var spec_sign = spec1.join('|');
    $.each(spec_param, function(i, n){
        if (n.sign == spec_sign) {
            window.location.href = n.url;
        }
    });
}

// 验证购买数量
function checkQuantity(){
    var quantity = parseInt($("#quantity").val());
    if (quantity < 1) {
        alert("请填写购买数量");
        $("#quantity").val('1');
        return false;
    }
    max = parseInt($('[nctype="goods_stock"]').text());
            if(quantity > max){
        alert("库存不足");
        return false;
    }
    return quantity;
}

// 立即购买js
function buynow(goods_id,quantity){
  login_dialog();
}

$(function(){
    //选择地区查看运费
    $('#transport_pannel>a').click(function(){
      var id = $(this).attr('nctype');
      if (id=='undefined') return false;
      var _self = this,tpl_id = '0';
      var url = 'index.php?act=goods&op=calc&rand='+Math.random();
      $('#transport_price').css('display','none');
      $('#loading_price').css('display','');
      $.getJSON(url, {'id':id,'tid':tpl_id}, function(data){
        if (data == null) return false;
          if(data != 'undefined') {$('#nc_kd').html('运费：<em>' + data + '</em>元');}else{'卖家承担运费';}
          $('#transport_price').css('display','');
        $('#loading_price').css('display','none');
          $('#ncrecive').html($(_self).html());
      });
    });
    $("#nc-bundling").load('index.php?act=goods&op=get_bundling&goods_id=100003', function(){
        if($(this).html() != '') {
            $(this).show();
        }
    });
    $("#salelog_demo").load('index.php?act=goods&op=salelog&goods_id=100003&store_id=1&vr=0', function(){
        // Membership card
        $(this).find('[nctype="mcard"]').membershipCard({type:'shop'});
    });
  $("#consulting_demo").load('index.php?act=goods&op=consulting&goods_id=100003&store_id=1', function(){
    // Membership card
    $(this).find('[nctype="mcard"]').membershipCard({type:'shop'});
  });

/** goods.php **/
  // 商品内容部分折叠收起侧边栏控制
  $('#fold').click(function(){
      $('.ncs-goods-layout').toggleClass('expanded');
  });
  // 商品内容介绍Tab样式切换控制
  $('#categorymenu').find("li").click(function(){
    $('#categorymenu').find("li").removeClass('current');
    $(this).addClass('current');
  });
  // 商品详情默认情况下显示全部
  $('#tabGoodsIntro').click(function(){
    $('.bd').css('display','');
    $('.hd').css('display','');
  });
  // 点击地图隐藏其他以及其标题栏
  $('#tabStoreMap').click(function(){
    $('.bd').css('display','none');
    $('#ncStoreMap').css('display','');
    $('.hd').css('display','none');
  });
  // 点击评价隐藏其他以及其标题栏
  $('#tabGoodsRate').click(function(){
    $('.bd').css('display','none');
    $('#ncGoodsRate').css('display','');
    $('.hd').css('display','none');
  });
  // 点击成交隐藏其他以及其标题
  $('#tabGoodsTraded').click(function(){
    $('.bd').css('display','none');
    $('#ncGoodsTraded').css('display','');
    $('.hd').css('display','none');
  });
  // 点击咨询隐藏其他以及其标题
  $('#tabGuestbook').click(function(){
    $('.bd').css('display','none');
    $('#ncGuestbook').css('display','');
    $('.hd').css('display','none');
  });
  //商品排行Tab切换
  $(".ncs-top-tab > li > a").mouseover(function(e) {
    if (e.target == this) {
      var tabs = $(this).parent().parent().children("li");
      var panels = $(this).parent().parent().parent().children(".ncs-top-panel");
      var index = $.inArray(this, $(this).parent().parent().find("a"));
      if (panels.eq(index)[0]) {
        tabs.removeClass("current ").eq(index).addClass("current ");
        panels.addClass("hide").eq(index).removeClass("hide");
      }
    }
  });
  //信用评价动态评分打分人次Tab切换
  $(".ncs-rate-tab > li > a").mouseover(function(e) {
    if (e.target == this) {
      var tabs = $(this).parent().parent().children("li");
      var panels = $(this).parent().parent().parent().children(".ncs-rate-panel");
      var index = $.inArray(this, $(this).parent().parent().find("a"));
      if (panels.eq(index)[0]) {
        tabs.removeClass("current ").eq(index).addClass("current ");
        panels.addClass("hide").eq(index).removeClass("hide");
      }
    }
  });

//触及显示缩略图
  $('.goods-pic > .thumb').hover(
    function(){
      $(this).next().css('display','block');
    },
    function(){
      $(this).next().css('display','none');
    }
  );

  /* 商品购买数量增减js */
  // 增加
  $('a[nctype="increase"]').click(function(){
    num = parseInt($('#quantity').val());
                max = parseInt($('[nctype="goods_stock"]').text());
    if(num < max){
      $('#quantity').val(num+1);
    }
  });
  //减少
  $('a[nctype="decrease"]').click(function(){
    num = parseInt($('#quantity').val());
    if(num > 1){
      $('#quantity').val(num-1);
    }
  });

    //评价列表
    $('#comment_tab').on('click', 'li', function() {
        $('#comment_tab li').removeClass('current');
        $(this).addClass('current');
        load_goodseval($(this).attr('data-type'));
    });
    load_goodseval('all');
    function load_goodseval(type) {
        var url = 'http://mall.wrtx.cn/shop/index.php?act=goods&op=comments&goods_id=100003';
        url += '&type=' + type;
        $("#goodseval").load(url, function(){
            $(this).find('[nctype="mcard"]').membershipCard({type:'shop'});
        });
    }

    //记录浏览历史
  $.get("index.php?act=goods&op=addbrowse",{gid:100003});
  //初始化对比按钮
  initCompare();

    
    // 满即送、加价购显示隐藏
    $('[nctype="show-rule"]').click(function(){
        $(this).parent().find('[nctype="rule-content"]').show();
    });
    $('[nctype="hide-rule"]').click(function(){
        $(this).parents('[nctype="rule-content"]:first').hide()
    });

    $('.ncs-buy').bind({
        mouseover:function(){$(".ncs-point").show();},
        mouseout:function(){$(".ncs-point").hide();}
    });
    
});

/* 加入购物车后的效果函数 */
function addcart_callback(data){
  $('#bold_num').html(data.num);
    $('#bold_mly').html(price_format(data.amount));
    $('.ncs-cart-popup').fadeIn('fast');
}

var $cur_area_list,$cur_tab,next_tab_id = 0,cur_select_area = [],calc_area_id = '',calced_area = [],cur_select_area_ids = [];
$(document).ready(function(){
  $("#ncs-freight-selector").hover(function() {
    //如果店铺没有设置默认显示区域，马上异步请求
        $(this).addClass("hover");
    $(this).on('mouseleave',function(){
      $(this).removeClass("hover");
    });
  });

  $('ul[class="area-list"]').on('click','a',function(){
    $('#ncs-freight-selector').unbind('mouseleave');
    var tab_id = parseInt($(this).parents('div[data-widget="tab-content"]:first').attr('data-area'));
    if (tab_id == 0) {cur_select_area = [];cur_select_area_ids = []};
    if (tab_id == 1 && cur_select_area.length > 1) {
      cur_select_area.pop();
      cur_select_area_ids.pop();
      if (cur_select_area.length > 1) {
        cur_select_area.pop();
        cur_select_area_ids.pop();
      }
    }
    next_tab_id = tab_id + 1;
    var area_id = $(this).attr('data-value');
    $cur_tab = $('#ncs-stock').find('li[data-index="'+tab_id+'"]');
    $cur_tab.find('em').html($(this).html());
    $cur_tab.find('i').html(' ∨');
    if (tab_id < 2) {
      calc_area_id = area_id;
      cur_select_area.push($(this).html());
      cur_select_area_ids.push(area_id);
      $cur_tab.find('a').removeClass('hover');
      $cur_tab.nextAll().remove();
      if (typeof nc_a === "undefined") {
          $.getJSON(SITEURL + "/index.php?act=index&op=json_area&callback=?", function(data) {
            nc_a = data;
            _loadArea(area_id);
          });
      } else {
        _loadArea(area_id);
      }
    } else {
      //点击第三级，不需要显示子分类
      if (cur_select_area.length == 3) {
        cur_select_area.pop();
        cur_select_area_ids.pop();
      }
      cur_select_area.push($(this).html());
      cur_select_area_ids.push(area_id);
      $('#ncs-freight-selector > div[class="text"] > div').html(cur_select_area.join(''));
      $('#ncs-freight-selector').removeClass("hover");
      _calc();
    }
    $('#ncs-stock').find('li[data-widget="tab-item"]').on('click','a',function(){
      var tab_id = parseInt($(this).parent().attr('data-index'));
      if (tab_id < 2) {
        $(this).parent().nextAll().remove();
        $(this).addClass('hover');
        $('#ncs-stock').find('div[data-widget="tab-content"]').each(function(){
          if ($(this).attr("data-area") == tab_id) {
            $(this).show();
          } else {
            $(this).hide();
          }
        });
      }
    });
  });
  function _loadArea(area_id){
    if (nc_a[area_id] && nc_a[area_id].length > 0) {
      $('#ncs-stock').find('div[data-widget="tab-content"]').each(function(){
        if ($(this).attr("data-area") == next_tab_id) {
          $(this).show();
          $cur_area_list = $(this).find('ul');
          $cur_area_list.html('');
        } else {
          $(this).hide();
        }
      });
      var areas = [];
      areas = nc_a[area_id];
      for (i = 0; i < areas.length; i++) {
        if (areas[i][1].length > 8) {
          $cur_area_list.append("<li class='longer-area'><a data-value='" + areas[i][0] + "' href='#none'>" + areas[i][1] + "</a></li>");
        } else {
            $cur_area_list.append("<li><a data-value='" + areas[i][0] + "' href='#none'>" + areas[i][1] + "</a></li>");
        }
      }
      if (area_id > 0){
        $cur_tab.after('<li data-index="' + (next_tab_id) + '" data-widget="tab-item"><a class="hover" href="#none" ><em>请选择</em><i> ∨</i></a></li>');
      }
    } else {
      //点击第一二级时，已经到了最后一级
      $cur_tab.find('a').addClass('hover');
      $('#ncs-freight-selector > div[class="text"] > div').html(cur_select_area);
      $('#ncs-freight-selector').removeClass("hover");
      _calc();
    }
  }
  //计算运费，是否配送
  function _calc() {
    $.cookie('dregion', cur_select_area_ids.join(' ')+'|'+cur_select_area.join(' '), { expires: 30 });
        return;
        var _args = '';
    _args += "&tid=0";
        if (_args != '') {
      _args += '&area_id=' + calc_area_id ;
      if (typeof calced_area[calc_area_id] == 'undefined') {
        //需要请求配送区域设置
        $.getJSON(SITEURL + "/index.php?act=goods&op=calc&" + _args + "&myf=0.00&callback=?", function(data){
          allow_buy = data.total ? true : false;
          calced_area[calc_area_id] = data.total;
          if (data.total === false) {
            $('#ncs-freight-prompt > strong').html('无货').next().remove();
            $('a[nctype="buynow_submit"]').addClass('no-buynow');
            $('a[nctype="addcart_submit"]').addClass('no-buynow');
            $('#store-free-time').hide();
          } else {
            $('#ncs-freight-prompt > strong').html('有货 ').next().remove();
            $('#ncs-freight-prompt > strong').after('<span>' + data.total + '</span>');
            $('a[nctype="buynow_submit"]').removeClass('no-buynow');
            $('a[nctype="addcart_submit"]').removeClass('no-buynow');
            $('#store-free-time').show();
          }
        }); 
      } else {
        if (calced_area[calc_area_id] === false) {
          $('#ncs-freight-prompt > strong').html('无货').next().remove();
          $('a[nctype="buynow_submit"]').addClass('no-buynow');
          $('a[nctype="addcart_submit"]').addClass('no-buynow');
          $('#store-free-time').hide();
        } else {
          $('#ncs-freight-prompt > strong').html('有货 ').next().remove();
          $('#ncs-freight-prompt > strong').after('<span>' + calced_area[calc_area_id] + '</span>');
          $('a[nctype="buynow_submit"]').removeClass('no-buynow');
          $('a[nctype="addcart_submit"]').removeClass('no-buynow');
          $('#store-free-time').show();
        }
      }
    }
  }
  //如果店铺设置默认显示配送区域
    if (typeof nc_a === "undefined") {
    $.getJSON(SITEURL + "/index.php?act=index&op=json_area&callback=?", function(data) {
      nc_a = data;
      $cur_tab = $('#ncs-stock').find('li[data-index="0"]');
      _loadArea(0);
      $('ul[class="area-list"]').find('a[data-value="19"]').click();
                      });
  }
  });
</script>  
@include('home.common.footer')
<script type="text/javascript" src="/home/js/jquery.cookie.js"></script>
<link href="/home/css/perfect-scrollbar.min.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="/home/js/jquery.qtip.min.js"></script>
<link href="/home/css/jquery.qtip.min.css" rel="stylesheet" type="text/css">
<!-- 对比 -->
<script src="/home/images/compare.js"></script>
<script type="text/javascript">
$(function(){
  // Membership card
  $('[nctype="mcard"]').membershipCard({type:'shop'});
});
</script>


<div></div>

<div id="ajax_info" style="display:none; background:#fff; box-shadow: 2px 2px 4px #222; font-size:14px; width:300px; text-align:center;  line-height:100px; padding-bottom:25px; z-index:100; position:absolute; top:45%; left:45%;">
 <dd style="-webkit-margin-start:0px; width:90%; margin:10px auto 0; height:15px; line-height:15px;">
   <span id="ajax_info_close" style="float:right;  cursor: pointer;">x</span>
 </dd>
  添加购物车成功!
<div/>

</body></html>